<!doctype html>
<html>
	<head>
		<script src="core.js" type="text/javascript"></script>
		<script type="text/javascript">
			$g.subscribe("click_yellow",function(args){
				console.log(this);
				console.log("args",args);
				console.log(args.dom_node);
				document.getElementById("subscriber1").style.background = "green";
			});
			
			$g.subscribe("click_yellow",function(args){
				console.log(this);
				console.log("args",args);
				console.log(args.dom_node);
				document.getElementById("subscriber2").style.background = "green";
			});
			
			window.onload = function(){

				document.getElementById("publisher").addEventListener("click",function(){
					$g.publish("click_yellow",{dom_node: this})
				},false);
			}
			
		</script>
		<style type="text/css" media="screen">
			#subscriber1, #subscriber2{
			 	width: 300px;
				height: 300px;
				background: red;
				float: left;
			}
			
			#publisher{
				float: left;
				width: 300px;
				height: 300px;
				background: yellow;
			}
		</style>
	</head>
	<body>
		<div id="subscriber1">
			
		</div>
		<div id="publisher">
			
		</div>
		<div id="subscriber2">
			
			
		</div>
	</body>
</html>